package com.ruoyi.patrol.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.patrol.mapper.PtFormDetailsOptionMapper;
import com.ruoyi.patrol.domain.PtFormDetailsOption;
import com.ruoyi.patrol.service.IPtFormDetailsOptionService;

/**
 * 单问题答案Service业务层处理
 * 
 * @author lkm
 * @date 2022-11-12
 */
@Service
public class PtFormDetailsOptionServiceImpl implements IPtFormDetailsOptionService 
{
    @Autowired
    private PtFormDetailsOptionMapper ptFormDetailsOptionMapper;

    /**
     * 查询单问题答案
     * 
     * @param id 单问题答案ID
     * @return 单问题答案
     */
    @Override
    public PtFormDetailsOption selectPtFormDetailsOptionById(Long id)
    {
        return ptFormDetailsOptionMapper.selectPtFormDetailsOptionById(id);
    }

    /**
     * 查询单问题答案列表
     * 
     * @param ptFormDetailsOption 单问题答案
     * @return 单问题答案
     */
    @Override
    public List<PtFormDetailsOption> selectPtFormDetailsOptionList(PtFormDetailsOption ptFormDetailsOption)
    {
        return ptFormDetailsOptionMapper.selectPtFormDetailsOptionList(ptFormDetailsOption);
    }

    /**
     * 新增单问题答案
     * 
     * @param ptFormDetailsOption 单问题答案
     * @return 结果
     */
    @Override
    public int insertPtFormDetailsOption(List<PtFormDetailsOption> ptFormDetailsOption)
    {
        return ptFormDetailsOptionMapper.insertPtFormDetailsOption(ptFormDetailsOption);
    }

    /**
     * 修改单问题答案
     * 
     * @param ptFormDetailsOption 单问题答案
     * @return 结果
     */
    @Override
    public int updatePtFormDetailsOption(PtFormDetailsOption ptFormDetailsOption)
    {
        return ptFormDetailsOptionMapper.updatePtFormDetailsOption(ptFormDetailsOption);
    }

    /**
     * 批量删除单问题答案
     * 
     * @param ids 需要删除的单问题答案ID
     * @return 结果
     */
    @Override
    public int deletePtFormDetailsOptionByIds(Long[] ids)
    {
        return ptFormDetailsOptionMapper.deletePtFormDetailsOptionByIds(ids);
    }

    /**
     * 删除单问题答案信息
     * 
     * @param id 单问题答案ID
     * @return 结果
     */
    @Override
    public int deletePtFormDetailsOptionById(Long id)
    {
        return ptFormDetailsOptionMapper.deletePtFormDetailsOptionById(id);
    }
}
